package com.oppo.action;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@WebServlet("/PaySkipAction")
public class PaySkipAction extends HttpServlet {
	private static final long serialVersionUID = 1L;

	
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		String[] productCheck = request.getParameterValues("productcheck");
		List<String>list = Arrays.asList(productCheck);
		request.getSession().setAttribute("car_ids", list);//缓存购物车号
		String allprice_copy = request.getParameter("allprice");
		String allprice = allprice_copy.substring(1);
		request.getSession().setAttribute("totalprice", allprice);//缓存总价
		request.getRequestDispatcher("Shopping-Successed.jsp").forward(request, response);
	}

}
